// pages/main/main.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    width:0,
    height:0,
    components:[{cname:'弹窗组件'},{cname:'手写签名组件'},{cname:'图片水印组件'}],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      width:wx.getSystemInfoSync().windowWidth,
      height:wx.getSystemInfoSync().windowHeight
    })
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
  componenttap:function(e){
    var name=e.currentTarget.dataset.cname
    console.log(e)
    switch(name){
      case '弹窗组件':
        wx.navigateTo({url: '/pages/main/dialog/dialog'})
        break;
      case '手写签名组件':
        wx.navigateTo({url: '/pages/main/sign/sign'})
        break;
      case '图片水印组件':
        wx.navigateTo({url: '/pages/main/watermark/watermark'})
        break;
    }
  },
})